package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.WGoodsTheoryWeightMapper;
import com.ruoyi.system.domain.WGoodsTheoryWeight;
import com.ruoyi.system.service.IWGoodsTheoryWeightService;

/**
 * 货物理重Service业务层处理
 * 
 * @author wzy
 * @date 2024-08-30 15:52:52
 */
@Service
public class WGoodsTheoryWeightServiceImpl implements IWGoodsTheoryWeightService 
{
    @Autowired
    private WGoodsTheoryWeightMapper wGoodsTheoryWeightMapper;

    /**
     * 查询货物理重
     * 
     * @param goodsTheoryWeightId 货物理重主键
     * @return 货物理重
     */
    @Override
    public WGoodsTheoryWeight selectWGoodsTheoryWeightByGoodsTheoryWeightId(Long goodsTheoryWeightId)
    {
        return wGoodsTheoryWeightMapper.selectWGoodsTheoryWeightByGoodsTheoryWeightId(goodsTheoryWeightId);
    }

    /**
     * 查询货物理重列表
     * 
     * @param wGoodsTheoryWeight 货物理重
     * @return 货物理重
     */
    @Override
    public List<WGoodsTheoryWeight> selectWGoodsTheoryWeightList(WGoodsTheoryWeight wGoodsTheoryWeight)
    {
        return wGoodsTheoryWeightMapper.selectWGoodsTheoryWeightList(wGoodsTheoryWeight);
    }

    /**
     * 新增货物理重
     * 
     * @param wGoodsTheoryWeight 货物理重
     * @return 结果
     */
    @Override
    public int insertWGoodsTheoryWeight(WGoodsTheoryWeight wGoodsTheoryWeight)
    {
        wGoodsTheoryWeight.setCreateTime(DateUtils.getNowDate());
        return wGoodsTheoryWeightMapper.insertWGoodsTheoryWeight(wGoodsTheoryWeight);
    }

    /**
     * 修改货物理重
     * 
     * @param wGoodsTheoryWeight 货物理重
     * @return 结果
     */
    @Override
    public int updateWGoodsTheoryWeight(WGoodsTheoryWeight wGoodsTheoryWeight)
    {
        wGoodsTheoryWeight.setUpdateTime(DateUtils.getNowDate());
        return wGoodsTheoryWeightMapper.updateWGoodsTheoryWeight(wGoodsTheoryWeight);
    }

    /**
     * 批量删除货物理重
     * 
     * @param goodsTheoryWeightIds 需要删除的货物理重主键
     * @return 结果
     */
    @Override
    public int deleteWGoodsTheoryWeightByGoodsTheoryWeightIds(Long[] goodsTheoryWeightIds)
    {
        return wGoodsTheoryWeightMapper.deleteWGoodsTheoryWeightByGoodsTheoryWeightIds(goodsTheoryWeightIds);
    }

    /**
     * 删除货物理重信息
     * 
     * @param goodsTheoryWeightId 货物理重主键
     * @return 结果
     */
    @Override
    public int deleteWGoodsTheoryWeightByGoodsTheoryWeightId(Long goodsTheoryWeightId)
    {
        return wGoodsTheoryWeightMapper.deleteWGoodsTheoryWeightByGoodsTheoryWeightId(goodsTheoryWeightId);
    }

    /**
     * 字典项产地
     *
     * @param wGoodsTheoryWeight 货物理重
     * @return 货物理重
     */
    @Override
    public List<WGoodsTheoryWeight> selectProductOptionByWGoodsTheoryWeight(WGoodsTheoryWeight wGoodsTheoryWeight)
    {
        return wGoodsTheoryWeightMapper.selectProductOptionByWGoodsTheoryWeight(wGoodsTheoryWeight);
    }

    /**
     * 字典项规格
     *
     * @param wGoodsTheoryWeight 货物理重
     * @return 货物理重
     */
    @Override
    public List<WGoodsTheoryWeight> selectSpecificationOptionByWGoodsTheoryWeight(WGoodsTheoryWeight wGoodsTheoryWeight)
    {
        return wGoodsTheoryWeightMapper.selectSpecificationOptionByWGoodsTheoryWeight(wGoodsTheoryWeight);
    }

    /**
     * 字典项材质
     *
     * @param wGoodsTheoryWeight 货物理重
     * @return 货物理重
     */
    @Override
    public List<WGoodsTheoryWeight> selectSteelGradeOptionByWGoodsTheoryWeight(WGoodsTheoryWeight wGoodsTheoryWeight)
    {
        return wGoodsTheoryWeightMapper.selectSteelGradeOptionByWGoodsTheoryWeight(wGoodsTheoryWeight);
    }
}
